package GUILag;

import java.util.ArrayList;

import ModelLag.*;
import KontrolLag.*;


public class GUI_Buffer 
{
	private ArrayList<Indlaeggelse> Indlaeggelser;
	private static GUI_Buffer instance;
	private IndlaeggelsesCtr IndCtr;


	private GUI_Buffer()
	{
		IndCtr = new IndlaeggelsesCtr();
		Indlaeggelser = new ArrayList<Indlaeggelse>();
		Indlaeggelser = IndCtr.alleIndlaeggelser();
	}
	
	public static GUI_Buffer getInstance()
	{
		if(instance == null)
		{
			instance = new GUI_Buffer();
		}
		return instance;
	}
	
	public void tilfoejIndlaeggelse(Indlaeggelse i)
	{
		Indlaeggelser.add(i);
	}
	
	public Indlaeggelse getIndlaeggelsesIndex(int index)
	{
		return Indlaeggelser.get(index);
	}
	
	public ArrayList<Indlaeggelse> getAlleIndlaeggelser()
	{
		return Indlaeggelser;
	}
	
	public int getIndex(Indlaeggelse i)
	{
		return Indlaeggelser.indexOf(i);
	}

	





}



